﻿Public Class fSetVyrobky

    Private Sub fSetVyrobky_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'DtbDataSet.seznam_vyrobky' table. You can move, or remove it, as needed.
        Me.Seznam_vyrobkyTableAdapter.Fill(Me.DtbDataSet.seznam_vyrobky)
        '----------------
        '----------------loading data from seznam_vyrobky
        Dim fill As String = ""
        Try
            For i As Int16 = 0 To Me.DtbDataSet.seznam_vyrobky.Rows.Count() - 1
                fill = fill & Convert.ToString(i + 1) & ". " & Me.DtbDataSet.seznam_vyrobky.Rows.Item(i).Item(1) & vbCrLf
            Next i
            Me.tboxVyrobky.Text = fill
            fill = ""
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical, "Error when loading data")
        End Try
        '----------------end of loading data
    End Sub

    Private Sub btnPridatVyrobek_Click(sender As System.Object, e As System.EventArgs) Handles btnPridatVyrobek.Click
        My.Forms.fSetVyrobkyDialog.ShowDialog()



    End Sub

End Class